//
//  FCommentCell.m
//  jingdongfang
//
//  Created by 郝志宇 on 16/9/12.
//  Copyright © 2016年 ZhiYu Hao. All rights reserved.
//

#import "FCommentCell.h"

@interface FCommentCell()

@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
@property (weak, nonatomic) IBOutlet UILabel *timeLab;
@property (weak, nonatomic) IBOutlet UILabel *contentLab;
@property (weak, nonatomic) IBOutlet UIButton *titleBtn;


@end


@implementation FCommentCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    _iconImageView.layer.cornerRadius = 30/2;
    _iconImageView.clipsToBounds = YES;

}

- (void)setFCommentModel:(CommentMeModel *)fCommentModel{
    if (fCommentModel.secondCommentContent && ![fCommentModel.secondCommentContent isEqualToString:@""]) {
//        _contentLab.text = [NSString stringWithFormat:@"回复%@:%@", fCommentModel.commentNick, fCommentModel.secondCommentContent];
        _contentLab.text = [NSString stringWithFormat:@"%@ %@:%@", NSLocalizedString(@"Reply", nil),fCommentModel.commentNick, fCommentModel.secondCommentContent];
    } else {
        _contentLab.text = fCommentModel.firstCommentContent;
    }
    [_iconImageView sd_setImageWithURL:[NSURL URLWithString:fCommentModel.commentUImg] placeholderImage:[UIImage imageNamed:@"place_head_Icon"]];
    _nameLab.text = fCommentModel.commentNick;
    _timeLab.text = fCommentModel.commentDate;
    [_titleBtn setTitle:fCommentModel.topicContent forState:0];

}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
